package com.studentmanage.api.system;

import com.studentmanage.framework.domain.common.response.ResponseResult;
import com.studentmanage.framework.domain.common.response.ResponseValue;
import com.studentmanage.framework.domain.system.LoginResult;
import com.studentmanage.framework.domain.system.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.UnsupportedEncodingException;
import java.util.List;

@Api(value = "用户管理",description = "用户管理接口")
public interface UserControllerApi {
    @ApiOperation("登录")
    public LoginResult login(User user);

    @ApiOperation("用户列表")
    public List<User> getList();

    @ApiOperation("删除用户")
    public ResponseResult delete(String id);

    @ApiOperation("新增用户")
    public ResponseResult add(User user);

    @ApiOperation("修改用户")
    public ResponseResult update(User user);

    @ApiOperation("查询用户")
    public ResponseValue<User> queryUser(String name);

    @ApiOperation("下载sql文件")
    public String downloadFile(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException;
}
